/**
 * 
 */
package com.dingding.dao.sql;

/**
 * @Title: UserLoginServiceSQL
 * @Description: 一句话描述方法的作用
 * @author Li Yi
 * @date 2015-10-22 下午08:13:15
 */

public class UserLoginServiceSQL {

	// 检查用户名是否存在
	// public static final String USER_ISEXIT =
	// "FROM userlogin WHERE userName=?";
	public static final String USER_LOGIN = "SELECT * FROM userlogin u WHERE u.UserName = ? AND u.UserPwd = ?";

	//查找用户详情表
	public static final String GET_USER_DETAIL_INFO = "SELECT  u.loginId,l.userRole,l.isDeposit,u.nickName,u.tellphone,u.age,u.sex,u.occupation,u.origin,u.userAvatar,u.homeAddress, u.homeLongitude,u.homeLatitude,u.companyAddress,u.companyLongitude,u.companyLatitude,u.startworkTime,u.endworkTime,v.lisencePlate,v.vstatus,v.vehicleType,v.vehicleModel,v.vehicleColor,v.xszImage,v.jszImage,v.vehicleImage,v.description,v.xszDescription,v.jszDescription,v.vehicleDescription,u.userTabloidAvatar,u.token,u.userLevel FROM userlogin l INNER JOIN userdetail u ON u.loginId = l.uid INNER JOIN vehicleinfo v ON v.loginId = l.uid WHERE l.uid = ?";

	//重置每日体现次数、接单次数、取消次数
	public static final String RESET_ORDER_NUMBER = "UPDATE userlogin u SET u.publishNumber = 0,u.cancelNumber = 0,u.depositNumber = 0,u.pushNumber = 0";
	
	//重置验证码验证失败次数
	public static final String RESET_VALIDATE_CODE_NUMBER = "UPDATE phonevalidate p SET p.validateCodeNumber = 0";
	
}
